package com.svconnect.plugin.model.wsdl;

import java.util.List;


public class Service {
	
	private String name;
	private Endpoint endpoint;
	private List<Operation> operations;
	private String namespace;
	
	public Service() {}
	
	public Service(String name, Endpoint endpoint) {
		this.setName(name);
		this.setEndpoint(endpoint);
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getName() {
		return name;
	}
	
	public void setEndpoint(Endpoint endpoint) {
		this.endpoint = endpoint;
	}
	
	public Endpoint getEndpoint() {
		return endpoint;
	}
	
	public List<Operation> getOperations() {
		return operations;
	}

	public void setOperations(List<Operation> operations) {
		this.operations = operations;
	}	
	
	public String getNamespace() {
		return namespace;
	}

	public void setNamespace(String namespace) {
		this.namespace = namespace;
	}	
	
	@Override
	public String toString() {
		return String.format("%s (%s)", this.getName(), this.getEndpoint().getAddress());
	}
}
